package com;

import com.client.CanalClient;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import javax.annotation.Resource;

/**
 * @Classname com.CanalApplication
 * @Description TODO
 * @Version 1.0.0
 * @Date 2022/7/18 14:52
 * @Created by liu25
 */

@SpringBootApplication
public class CanalApplication implements CommandLineRunner {

    @Resource
    private CanalClient canalClient;

    public static void main(String[] args) {
        SpringApplication.run(CanalApplication.class, args);
    }

    @Override
    public void run(String... args) throws Exception {
//        项目启动,执行canal客户端监听
        canalClient.run();
    }

}
